package o;

import android.text.TextUtils;
import java.util.ArrayList;
import java.util.Locale;

public final class edf {
    private static edf ॱ = new edf();

    private edf() {
    }

    public static edf ˋ() {
        return ॱ;
    }

    public String ॱ(String str) {
        if (TextUtils.isEmpty(str)) {
            return str;
        }
        StringBuffer stringBuffer = new StringBuffer();
        String str2 = "";
        for (int i = 0; i < str.length(); i++) {
            try {
                str2 = ˎ(Character.toString(str.charAt(i)));
            } catch (Throwable th) {
                str2 = ˏ(Character.toString(str.charAt(i)));
            }
            stringBuffer.append(str2);
        }
        return stringBuffer.toString();
    }

    private String ˏ(String str) {
        ArrayList ॱ = edb.ˏ().ॱ(str);
        if (ॱ.size() <= 0) {
            return ˊ(str);
        }
        edg o_edg = (edg) ॱ.get(0);
        if (o_edg == null) {
            return str;
        }
        String ॱ2 = o_edg.ॱ();
        if (ॱ2 != null) {
            return ॱ2.toLowerCase(Locale.ENGLISH);
        }
        return str;
    }

    private String ˎ(String str) {
        ArrayList ˋ = ede.ˋ().ˋ(str);
        if (ˋ.size() <= 0) {
            return ˊ(str);
        }
        edg o_edg = (edg) ˋ.get(0);
        if (o_edg == null) {
            return str;
        }
        String ॱ = o_edg.ॱ();
        if (ॱ != null) {
            return ॱ.toLowerCase(Locale.ENGLISH);
        }
        return str;
    }

    private String ˊ(String str) {
        String ॱ = edb.ˏ().ˊ(str.charAt(0)).ॱ();
        if (ॱ != null) {
            return ॱ.toLowerCase(Locale.ENGLISH);
        }
        return str;
    }
}
